import { request } from '@/utils'

export default {
    initMenus: () => {
        return request({
            url: '/initMenus',
            method: 'post',
        })
    },
    getMenus: () => {
        return request({
            url: '/menus',
            method: 'get',
        })
    },
    createMenu: (data) => {
        return request({
            url: '/menus',
            method: 'post',
            data,
        })
    },
    updateMenu: (id, data) => {
        return request({
            url: `/menus/${id}`,
            method: 'put',
            data,
        })
    },
    deleteMenu: (id) => {
        return request({
            url: `/menus/${id}`,
            method: 'delete',
        })
    }

}